package com.quikin.persistence.jpa.test;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the EMPLOYEE_CREDENTIAL database table.
 * 
 */
@Embeddable
public class EmployeeCredentialPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="COMPANY_ID")
	private String companyId;

	@Column(name="EMPLOYEE_ID")
	private String employeeId;

    public EmployeeCredentialPK() {
    }
	public String getCompanyId() {
		return this.companyId;
	}
	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}
	public String getEmployeeId() {
		return this.employeeId;
	}
	public void setEmployeeId(String employeeId) {
		this.employeeId = employeeId;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof EmployeeCredentialPK)) {
			return false;
		}
		EmployeeCredentialPK castOther = (EmployeeCredentialPK)other;
		return 
			this.companyId.equals(castOther.companyId)
			&& this.employeeId.equals(castOther.employeeId);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.companyId.hashCode();
		hash = hash * prime + this.employeeId.hashCode();
		
		return hash;
    }
}